Skip to content

feat: add CI workflow and contributing guidelines for import rules#204

Merged
phertyameen merged 11 commits intoMindBlockLabs:mainfrom
Obiajulu-gif:feature/ci/cd_protection
Jan 27, 2026
Merged

feat: add CI workflow and contributing guidelines for import rules#204
phertyameen merged 11 commits intoMindBlockLabs:mainfrom
Obiajulu-gif:feature/ci/cd_protection

Conversation

@Obiajulu-gif
Copy link
Copy Markdown
Contributor

Closes #203
This pull request introduces new guidelines and automated checks to enforce import style and improve code quality. It adds a GitHub Actions workflow for continuous integration (CI) and documents the new import rules and branch protection requirements.

CI Workflow and Import Rules Enforcement:

  • Adds a .github/workflows/ci.yml file that defines three jobs:
    • lint-imports: Fails the build if any absolute imports from src/ are found in .ts or .tsx files, enforcing the use of relative imports.
    • build: Installs dependencies and builds both frontend and backend workspaces.
    • type-check: Runs TypeScript type checks for both frontend and backend.

Documentation Updates:

  • Updates CONTRIBUTING.md to:
    • Clearly state the rule requiring relative imports instead of absolute imports from src/.
    • Provide examples of correct and incorrect import statements.
    • Explain that CI will reject PRs violating this rule and how to check locally.
    • Document the required CI status checks (lint-imports, build, type-check) and branch protection rules for main and develop.

Copy link
Copy Markdown
Member

@phertyameen phertyameen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice setup!

But I expect you to run the test and fix the existing errors in the app too. This will definitely break existing code.
Based on your setup, some commands to run will be (run them, fix the little errors and incluse the commands in the contributing.md):

npm ci
npm --workspace frontend run build
npm --workspace backend run build

npm --workspace frontend exec -- tsc --noEmit -p tsconfig.json
npm --workspace backend exec -- tsc --noEmit -p tsconfig.json

Sample error after running the greb in the CONTRIBUTING.md

./backend/src/quests/controllers/daily-quest.controller.ts:14:import { User } from 'src/users/user.entity';

@phertyameen
Copy link
Copy Markdown
Member

@Obiajulu-gif have you seen my requested change? you also need to update your code. The earlier you resolve the cicd, The less errors youre likely to come accross

@Obiajulu-gif
Copy link
Copy Markdown
Contributor Author

Close #203 i have fix the issue @phertyameen

@phertyameen
Copy link
Copy Markdown
Member

Unfortunately, your tests are still failing

@phertyameen
Copy link
Copy Markdown
Member

@Obiajulu-gif hold on and dont change this. Let me give you some help

@phertyameen phertyameen force-pushed the feature/ci/cd_protection branch from 92ba27a to 5c61724 Compare January 27, 2026 18:41
@phertyameen phertyameen merged commit dd5477c into MindBlockLabs:main Jan 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CI/CD Protection for Import Path Enforcement

5 participants